package com.gopay.common.domain.cbrmb;

import java.util.Date;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Id;
import javax.persistence.Table;

import com.gopay.common.cipher.utils.SensitiveInfoUtils;
import com.gopay.common.domain.BaseEntity;

/**
 * 企业客户申请跨境功能的申请表
 * 
 * @author huangcheng
 * 
 */
@Entity
@Table(name = "CB_CORP_APPLY")
public class CbCorpApply extends BaseEntity {

    private static final long serialVersionUID = 8647663841312377862L;

    /**
     * 客户ID
     */
    private String custId;

    /**
     * 企业名称
     */
    private String corpName;

    /**
     * 企业网址
     */
    private String corpUrl;

    /**
     * 联系人姓名
     */
    private String linkmanName;

    /**
     * 联系人电话
     */
    private String linkmanTel;

    /**
     * 提交时间-人民币
     */
    private Date applyDate;

    /**
     * 审核时间-人民币
     */
    private Date verifyDate;

    /**
     * 申请状态-人民币 0-待审核 1-审核通过 2-审核不通过
     */
    private String verifyState;

    /**
     * 失败原因-人民币
     */
    private String failMessage;

    /**
     * 提交时间-外卡
     */
    private Date applyDateWk;

    /**
     * 审核时间-外卡
     */
    private Date verifyDateWk;

    /**
     * 申请状态-外卡 0-待审核 1-审核通过 2-审核不通过
     */
    private String verifyStateWk;

    /**
     * 失败原因-外卡
     */
    private String failMessageWk;

    /**
     * 创建时间
     */
    private Date createdTs;

    /**
     * 记录最后修改时间
     */
    private Date lastUpdTs;

    public CbCorpApply() {
    }

    public CbCorpApply(String custId, String corpName, String corpUrl, String linkmanName, String linkmanTel,
            Date applyDate, Date verifyDate, String verifyState, String failMessage, Date applyDateWk,
            Date verifyDateWk, String verifyStateWk, String failMessageWk, Date createdTs, Date lastUpdTs) {
        setCustId(custId);
        setCorpName(corpName);
        setCorpUrl(corpUrl);
        setLinkmanName(linkmanName);
        setLinkmanTel(linkmanTel);
        setApplyDate(applyDate);
        setVerifyDate(verifyDate);
        setVerifyState(verifyState);
        setFailMessage(failMessage);
        setApplyDateWk(applyDateWk);
        setVerifyDateWk(verifyDateWk);
        setVerifyStateWk(verifyStateWk);
        setFailMessageWk(failMessageWk);
        setCreatedTs(createdTs);
        setLastUpdTs(lastUpdTs);
    }

    @Id

    @Column(name = "CUST_ID", unique = true, nullable = false, length = 10)
    public String getCustId() {
        return this.custId;
    }

    public void setCustId(String custId) {
        this.custId = custId;
    }

    @Column(name = "CORP_NAME", nullable = false, length = 140)
    public String getCorpName() {
        return this.corpName;
    }

    public void setCorpName(String corpName) {
        this.corpName = corpName;
    }

    @Column(name = "CORP_URL", nullable = false, length = 500)
    public String getCorpUrl() {
        return this.corpUrl;
    }

    public void setCorpUrl(String corpUrl) {
        this.corpUrl = corpUrl;
    }

    @Column(name = "LINKMAN_NAME", length = 150)
    public String getLinkmanName() {
        this.linkmanName = SensitiveInfoUtils.autoReencrypt(this.linkmanName);
        return SensitiveInfoUtils.smartDecryptWithCheck(this.linkmanName);
    }

    public void setLinkmanName(String linkmanName) {
        this.linkmanName = SensitiveInfoUtils.smartEncryptWithCheck(linkmanName);
    }

    @Column(name = "LINKMAN_TEL", length = 150)
    public String getLinkmanTel() {
        this.linkmanTel = SensitiveInfoUtils.autoReencrypt(this.linkmanTel);
        return SensitiveInfoUtils.smartDecryptWithCheck(this.linkmanTel);
    }

    public void setLinkmanTel(String linkmanTel) {
        this.linkmanTel = SensitiveInfoUtils.smartEncryptWithCheck(linkmanTel);
    }

    @Column(name = "APPLY_DATE")
    public Date getApplyDate() {
        return this.applyDate;
    }

    public void setApplyDate(Date applyDate) {
        this.applyDate = applyDate;
    }

    @Column(name = "VERIFY_DATE")
    public Date getVerifyDate() {
        return this.verifyDate;
    }

    public void setVerifyDate(Date verifyDate) {
        this.verifyDate = verifyDate;
    }

    @Column(name = "VERIFY_STATE", length = 1)
    public String getVerifyState() {
        return this.verifyState;
    }

    public void setVerifyState(String verifyState) {
        this.verifyState = verifyState;
    }

    @Column(name = "FAIL_MESSAGE", length = 500)
    public String getFailMessage() {
        return this.failMessage;
    }

    public void setFailMessage(String failMessage) {
        this.failMessage = failMessage;
    }

    @Column(name = "APPLY_DATE_WK")
    public Date getApplyDateWk() {
        return this.applyDateWk;
    }

    public void setApplyDateWk(Date applyDateWk) {
        this.applyDateWk = applyDateWk;
    }

    @Column(name = "VERIFY_DATE_WK")
    public Date getVerifyDateWk() {
        return this.verifyDateWk;
    }

    public void setVerifyDateWk(Date verifyDateWk) {
        this.verifyDateWk = verifyDateWk;
    }

    @Column(name = "VERIFY_STATE_WK", length = 1)
    public String getVerifyStateWk() {
        return this.verifyStateWk;
    }

    public void setVerifyStateWk(String verifyStateWk) {
        this.verifyStateWk = verifyStateWk;
    }

    @Column(name = "FAIL_MESSAGE_WK", length = 500)
    public String getFailMessageWk() {
        return this.failMessageWk;
    }

    public void setFailMessageWk(String failMessageWk) {
        this.failMessageWk = failMessageWk;
    }

    @Column(name = "CREATED_TS")
    public Date getCreatedTs() {
        return this.createdTs;
    }

    public void setCreatedTs(Date createdTs) {
        this.createdTs = createdTs;
    }

    @Column(name = "LAST_UPD_TS")
    public Date getLastUpdTs() {
        return this.lastUpdTs;
    }

    public void setLastUpdTs(Date lastUpdTs) {
        this.lastUpdTs = lastUpdTs;
    }

}
